package com.devplatform.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Data
public class ArticlePublishDto {
    private Long articleId;         // 编辑时传入

    @NotBlank(message = "标题不能为空")
    @Size(max = 200, message = "标题长度≤200字")
    private String title;

    @NotBlank(message = "内容不能为空")
    private String content;         // 富文本HTML

    private String summary;         // 摘要（可选）

    @NotEmpty(message = "至少选择1个板块")
    @Size(min = 1, max = 5, message = "板块数量1-5个")
    private List<Integer> categoryIds;

    private List<MultipartFile> attachments;
}
